package com.yunxi.module.system.mapper.sms;

import com.yunxi.framework.mybatis.core.mapper.BaseMapperX;
import com.yunxi.module.system.model.sms.SmsChannelDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 短信渠道 mapper
 * </p>
 *
 * @author lidy
 * @since 2024-05-08
 */
@Mapper
public interface SmsChannelMapper extends BaseMapperX<SmsChannelDO> {

    /**
     * 根据 Code 查询短息渠道
     *
     * @param code code
     * @return 短息渠道
     */
    default SmsChannelDO selectByCode(String code) {
        return selectOne(SmsChannelDO::getCode, code);
    }
}
